package com.demo1.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;

/**
 * 订单主表
 */
@TableName("order_information")
@Data

public class Order {

    private Integer id; // 订单号
    @TableField("tenant_id")
    private Integer tenantId; // 租客id
    @TableField("merchant_id")
    private Integer merchantId; // 店家id
    @TableField("pet_id")
    private Integer petId; // 宠物id
    @TableField("payment_price")
    private String paymentPrice; // 支付价格
    @TableField("rental_address")
    private String rentalAddress; // 租赁地址
    @TableField("lease_time")
    private int leaseTime; // 租赁时间

    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField("start_date")
    private Date startDate; // 租赁开始日期

    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField("end_date")
    private Date endDate; // 租赁结束日期

    private Integer status=1; // 订单状态
    @TableField(exist = false)
    private String orderImage = "default.jpg"; // 订单图片
}
